package com.kitty.game.fight.factory;

import com.kitty.game.role.model.Role;
import com.kitty.game.boss.model.BossFightParam;
import com.kitty.game.fight.factory.model.NewBossFight;
import com.kitty.game.fight.service.FightExecutorService;
import com.kitty.game.team.model.Team;
import com.kitty.game.fight.factory.FightFactory;

public class NewBossFightFactory extends FightFactory {


    public NewBossFight create(int mapId, Object... params) {
        Role role = (Role) params[0];
        Team team = (Team) params[1];
        BossFightParam bossFightParam = (BossFightParam) params[2];

        NewBossFight battleground = new NewBossFight(bossFightParam.getFightType(), mapId, role, team, bossFightParam);
        battleground.setMapId(mapId);
        battleground.setNpcId(bossFightParam.getNpcId());
/*        ArrayList<FightObject> memberListA = new ArrayList<>();
        battleground.setListA(memberListA);*/
        battleground.setTaskId(bossFightParam.getTaskId());
        battleground.setLeaderId(team.getLeaderRoleId());

        role.getActivity().setMonsterCount(bossFightParam.getBossParamList().size());


        FightExecutorService.FIGHTS.put(battleground.getId(), battleground);

        return battleground;
    }



}
